<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Sys_admin\IndexDataController;
use App\Http\Controllers\Sys_admin\OperateController;
use App\Http\Controllers\Sys_admin\OrderController;
use App\Http\Controllers\Sys_admin\StationController;
use App\Http\Controllers\Sys_admin\UserController;
use App\Http\Controllers\Sys_api\StationAPIController;
use App\Http\Controllers\Sys_api\LoginAPIController;
use App\Http\Controllers\Sys_api\PayAPIController;
use App\Http\Controllers\Sys_api\WxPayAPIController;
use App\Http\Controllers\AdminController;

/*
|--------------------------------------------------------------------------
| 充电桩管理系统
|--------------------------------------------------------------------------
| by zqc
| 2024-03-26
*/

Route::get('/', function () {
    return view('/cd_admin_sys/index');
});

/**
 * 看板
 */
Route::prefix('/main')->group(function () {
    Route::get('jian-kong', [IndexDataController::class, 'JianKong']);
    Route::get('show-data', [IndexDataController::class, 'ShowData']);
});

/**
 * 经营
 */
Route::prefix('/operate')->group(function () {
    Route::get('add-base-price-template', [OperateController::class, 'AddBasePriceTemplate']);//价格模板
    Route::get('base-price-template', [OperateController::class, 'BasePriceTemplate']);//价格模板
    Route::get('zong-lan', [OperateController::class, 'ZongLan']);//充电站总览
});

/**
 * 订单管理
 */
Route::prefix('/order')->group(function(){
    Route::get('order-list', [OrderController::class, 'OrderList']);//订单管理列表
    Route::get('order-info', [OrderController::class, 'OrderInfo']);//订单管理详细
});

/**
 * 充电站管理
 */
Route::prefix('/station')->group(function(){
    Route::get('base-station', [StationController::class, 'BaseStation']);//充电站管理列表
    Route::get('add-station', [StationController::class, 'AddStation']);//添加充电站
    Route::get('edit-station', [StationController::class, 'EditStation']);//编辑充电站
    Route::get('base-equipment', [StationController::class, 'BaseEquipment']);//充电桩管理列表
    Route::get('add-base-equipment', [StationController::class, 'AddBaseEquipment']);//添加充电桩
    Route::get('add-base-equipment-prot', [StationController::class, 'AddBaseEquipmentProt']);//添加充电桩接口
    Route::get('select-base-price-template-prot', [StationController::class, 'SelectBasePriceTemplate']);//选择充电价格模板
});

/**
 * 会员管理
 */
Route::prefix('/users')->group(function(){
    Route::get('user-car', [UserController::class, 'UserCar']);//会员车辆信息列表
    Route::get('user-agreement', [UserController::class, 'UserAgreement']);//会员协议管理
    Route::get('user-list', [UserController::class, 'UserList']);//会员管理
});


/**
 * 管理员管理
 */


 /**
 * 资金管理
 */



 /**
 * 监控管理
 */


  /**
 * 广告管理
 */


 /**
  * API
  */

Route::prefix('/API')->group(function(){
    Route::post('station-list', [StationAPIController::class, 'StationListAPI']);//station list
    Route::post('station-info', [StationAPIController::class, 'StationInfoAPI']);//station info

    Route::post('add-station-fav', [StationAPIController::class, 'AddStationFavoriteAPI']);//添加收藏站點
    Route::post('station-fav-list', [StationAPIController::class, 'StationFavoriteListAPI']);//收藏站点列表
    Route::post('del-station-fav-list', [StationAPIController::class, 'StationFavoriteDelAPI']);//删除收藏站点
    
    Route::post('user-recharge', [WxPayAPIController::class, 'RechargeAPI']);//用戶充值
    Route::any('notify_url', [WxPayAPIController::class, 'WxPaySuccessNotify']);//用戶充值回調

    
    Route::post('user-recharge-records', [PayAPIController::class, 'RechargeRecordsAPI']);//用户充值记录
    Route::post('user-station-pay-records', [PayAPIController::class, 'StationPayAPI']);//用户支付订单
    Route::post('user-order-detail', [PayAPIController::class, 'OrderDetailAPI']);//用户订单详情
    Route::post('user-end-order', [PayAPIController::class, 'EndOrderAPI']);//用户结束订单
    Route::post('user-order-list', [PayAPIController::class, 'OrderListAPI']);//用户订单列表


    Route::post('user-login', [LoginAPIController::class, 'LoginAPI']);//用户登录
    Route::post('user-info', [LoginAPIController::class, 'UserInfoAPI']);//用户信息

});


